<?php 
	//error_reporting(E_ALL);
 	//ini_set("display_errors", 1);
 	   
	include_once './templates/display.php';
    include_once './templates/modules.php';
    
	Displayer::displayHeader('Shop');

    if(isset($_SESSION['current_user']))
    {
        $user = unserialize($_SESSION['current_user']);

        echo '<div id="my_account">
                Mon compte
              </div>
              <a href="deconnexion.php" class="EButton" id="deco_but">Se déconnecter</a>
              <div id="perso_infos">
                Mes informations personelles
              </div>
              <div id="infos_block">
                <div class="infos_details">
                    <div>Pseudo</div>
                    <strong>'.$user->getLogin().'</strong>
                </div>
                <div class="infos_details">
                    <div>Adresse</div>
                    <strong>'.$user->getAdresse().'</strong>
                </div>
                <div class="infos_details">
                    <div>Ville</div>
                    <strong>'.$user->getCity().'</strong>
                </div>';
				if($user->getTypeUser() == "Producteur")
					echo '<a href="addProduct.php" class="EButton">Ajouter un produit</a>';
        echo      '</div><br/>';
    }

	Displayer::displayFooter();
?>